A graphical combo box. More...
Classes | |
| class | Entry |
| Represents an entry within the combo box. More... | |
Public Member Functions | |
| ComboBox () | |
| ~ComboBox () | |
| Entry * | getEntryPerLabel (const std::string_view &label) const |
| Entry * | getEntryPerData (void *data) const |
| virtual Entry * | getCurrentSelection () const |
| comboSelectionCallback | getSelectionSpecializedCallback () const |
| void | setSelectionSpecializedCallback (comboSelectionCallback value) |
| void | setSelectedEntryPerLabel (const std::string_view &label) |
| void | setSelectedEntryPerData (void *data) |
| virtual void | setSelectedEntry (Entry *selected) |
| virtual Entry * | insertEntry (const std::string_view &label, void *data) |
| void | setEntryData (const std::string_view &label, void *newData) |
| virtual void * | deleteEntry (const std::string_view &label) |
| virtual void | clearEntries () |
| virtual void | exportIntrospection (nkExport::Node *rootNode) override |
| virtual void | importClassFromTree (nkExport::Node *rootNode) override |
Public Member Functions inherited from nkWinUi::Component | |
| Component () | |
| virtual | ~Component () |
| Layout * | getLayout () const |
| nkMaths::Point | getPositionInParent () const |
| nkMaths::Point | getPositionInScreen () const |
| int | getWidth () const |
| int | getHeight () const |
| nkMaths::Rectangle | getArea () const |
| virtual nkMaths::Point | getBorderExtents () const |
| virtual int | getLayoutAllowedWidth () const |
| virtual int | getLayoutAllowedHeight () const |
| virtual int | getLayoutAllowedOffsetX () const |
| virtual int | getLayoutAllowedOffsetY () const |
| bool | isInitialized () const |
| Component * | getParentComponent () const |
| COMPONENT_TYPE | getComponentType () const |
| const char * | getComponentName () const |
| bool | getVisibility () const |
| virtual const char * | getLabel () const |
| void * | getData () const |
| bool | isEnabled () const |
| bool | isForegroundWindow () const |
| unsigned int | getZDepth () const |
| virtual Layout * | setLayout (LAYOUT_TYPE layoutType) |
| virtual void | setPositionInParent (nkMaths::Point position) |
| virtual void | setPositionInScreen (nkMaths::Point position) |
| virtual void | setSize (int width, int height) |
| virtual void | setWidth (int width) |
| virtual void | setHeight (int height) |
| void | setMinSize (unsigned int width, unsigned int height) |
| void | setMaxSize (unsigned int width, unsigned int height) |
| void | setRatio (float widthOverHeight) |
| virtual void | setArea (nkMaths::Rectangle area) |
| virtual void | setParentComponent (Component *parent, bool makeItVisible=true) |
| virtual void | setLabel (const std::string_view &label) |
| void | setComponentName (const std::string_view &name) |
| virtual void | setVisibility (bool value) |
| void | setData (void *data) |
| void | setEnabled (bool value) |
| void | addChild (Component *child, bool makeItVisible=true) |
| void | removeChild (Component *child) |
| void | removeChild (unsigned int index) |
| Component * | getChild (unsigned int index) |
| unsigned int | getChildIndex (Component *child) |
| void | unloadWithChildren () |
| void | loadWithChildren () |
| void | updateZDepth () |
| void | bringToForeground () |
| void | focusWindow () |
| nkMaths::Point | getCoordRelativeFromAbsolute (const nkMaths::Point &absCoords) |
| nkMaths::Point | getCoordAbsoluteFromRelative (const nkMaths::Point &relCoords) |
| virtual void | load ()=0 |
| virtual void | unload ()=0 |
| virtual void | updateWindow () |
| void | onSized () |
| ContextMenu * | createContextMenu () |
| ContextMenu * | getCurrentContextMenu () |
| void | shutContextMenu () |
| virtual void | exportClassToTree (nkExport::Node *rootNode) override |
Public Member Functions inherited from nkExport::Exportable | |
| Exportable () | |
| virtual | ~Exportable () |
A graphical combo box.
| nkWinUi::ComboBox::ComboBox | ( | ) |
Constructor.
| nkWinUi::ComboBox::~ComboBox | ( | ) |
Destructor.
| Entry* nkWinUi::ComboBox::getEntryPerLabel | ( | const std::string_view & | label | ) | const |
| label | The label of the entry that needs to be obtained. |
| Entry* nkWinUi::ComboBox::getEntryPerData | ( | void * | data | ) | const |
Returns the entry in the combo box that has the data provided attached.
| data | The data pointer the entry requested should have. |
|
virtual |
| comboSelectionCallback nkWinUi::ComboBox::getSelectionSpecializedCallback | ( | ) | const |
| void nkWinUi::ComboBox::setSelectionSpecializedCallback | ( | comboSelectionCallback | value | ) |
Sets the selection callback. Will be called over the global selection callback set in the InputSystem.
| value | The callback to use. |
| void nkWinUi::ComboBox::setSelectedEntryPerLabel | ( | const std::string_view & | label | ) |
Sets the selected entry, using the label.
| label | The label to find the entry to select. |
| void nkWinUi::ComboBox::setSelectedEntryPerData | ( | void * | data | ) |
Sets the selected entry, using the data that should be attached to it.
| data | The data to find the entry to select. |
|
virtual |
Sets the selected entry.
| selected | The entry to select. |
|
virtual |
Inserts a new entry within the combo box.
| label | The label the entry should have. |
| data | The user data to attach to the entry. |
| void nkWinUi::ComboBox::setEntryData | ( | const std::string_view & | label, |
| void * | newData | ||
| ) |
Overrides the user data attached to an entry.
| label | The label to find back the entry requested. |
| newData | The user data to attach to the entry. |
|
virtual |
Erases an entry. Entry memory will be freed.
| label | the label to find back the entry requested. |
|
virtual |
Clear all entries from the combo box. Entries memory will be freed.
|
overridevirtual |
See nkWinUi::Component::exportIntrospection().
Reimplemented from nkWinUi::Component.
|
overridevirtual |
See nkWinUi::Component::importClassFromTree().
Reimplemented from nkWinUi::Component.